﻿namespace WLFramework.Validation
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public sealed class ValidateResult
    {
        public static ValidateResult Success = new ValidateResult();

        private bool _isSuccess;
        public bool IsSuccess { get { return _isSuccess; } }

        private string _errorMessage;
        public string ErrorMessage { get { return _errorMessage; } }

        public ValidateResult()
            : this(true, string.Empty)
        {
        }

        public ValidateResult(string errorMessage)
            : this(false, errorMessage)
        {
        }

        public ValidateResult(bool success, string errorMessage)
        {
            this._isSuccess = success;
            this._errorMessage = errorMessage;
        }
    }
}
